<?php
// +----------------------------------------------------------------------
// | PHP [ JUST YOU ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2017 http://www.jyphp.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: FlyingPig <flyingpigfp@163.com>
// +----------------------------------------------------------------------

namespace App\Http\Middleware;


use App\Common\Logger;
use Closure;
use Illuminate\Http\Request;

class SetRequestLog
{

    public function handle(Request $request, Closure $next)
    {
        Logger::instance()->info('api',"REQUEST_FROM:  {$request->ip()}");
        Logger::instance()->info('api','REQUEST:'. urldecode($request->getUri()));
        return $next($request);
    }

}